#!/usr/bin/python
"""
Obol Hub
Copyright, license, etc notice..

"""

class BaseElement:
        def __init__( self ):
                self.name = ''
                self.id = ''
                self.child = []
                
        def __setitem__( self,name,value ):
                if name == 'name':
                        self.name = value
                if name == 'id':
                        self.id = value
                
        def __getitem__( self, name ):
                if name == 'name':
                        return self.name
                if name == 'id':
                        return self.id
                        
        def rander( self,  tabsize = 0) :
                tabspace = '' * tabsize
                html = tabspace + self.begin()
                for c in self.child:
                        if isinstance(c,str):
                                html = html +  c
                        else:
                                html = html +  c.rander()
                html = html + tabspace + self.end()
                return html
                
                
        def begin( self ):
                pass
        def end( self ):
                pass


        
                    
